import Doc from '~/components/layout/docs'
import { InlineCode } from '~/components/text/code'
import Snippet from '~/components/snippet'
import Link from '~/components/text/link'
import Caption from '~/components/text/caption'
import Note from '~/components/text/note'
import { Image } from '~/components/media'

export const meta = {
  title: 'Projects',
  description: 'Setting up projects with a list of deployments on ZEIT Now.',
  editUrl: 'pages/docs/v2/platform/projects.mdx',
  lastEdited: '2020-01-24T10:37:14.000Z'
}

A Project is a logical structure that groups [deployments](/docs/v2/platform/deployments) and [custom domains](/docs/v2/custom-domains) inside of an account or team, based on the name of the project. This structure allows easier tracking and managing of deployments.

The Projects structure enables faster locating of [deployments logs](/docs/v2/platform/deployments/#logs-view), [source code](/docs/v2/platform/deployments/#source-view), and [custom domains](/docs/v2/custom-domains).

## Creating a Project

Projects are automatically created when making a deployment using the name of the repository connected with a [ZEIT Now for Git Integration](/docs/v2/git-integrations).

You can import your existing project from the ["Create a new project"](/new) section of the ZEIT Dashboard. If you do not have an existing project, this page also allows you to get started from a template.

If you would like your Project to be created with a name different to that of the repository, you can include a configuration file and use the [name property](/docs/configuration#project/name).

## Deleting a Project

You can remove a project and all of the deployments contained within it by navigation to your project from your dashboard, followed by its settings tab.

<Image
  src={`${process.env.ASSETS}/docs/platform/projects/project-tabs.png`}
  width={714/2}
  height={208/2}
  shadow
  borderRadius
/>
<Caption>The tabs for a project overview, with "Settings" active.</Caption>

Within the settings tab, locate the "Delete This Project" fieldset, confirm that you would like to delete your project and then click the "Delete" button.

<Image
  src={`${process.env.ASSETS}/docs/platform/projects/delete-project.png`}
  width={1448/2}
  height={502/2}
  shadow
  borderRadius
/>
<Caption>The "Delete This Project" fieldset within a project's settings.</Caption>

<Note type="warning" label="Note">
  Deleting your project will also delete the deployments within it. If you have
  any deployments that are assigned to a custom domain and do not want them to
  be removed, make sure to deploy and assign them to the custom domain under a
  different project first.
</Note>

export default ({ children }) => <Doc meta={meta}>{children}</Doc>

export const config = {
  amp: 'hybrid'
}
